<template>
  <p>{{ fetchData }}</p>
  <button @click="fetchMethod">fetch</button>
</template>

<script>
import axios from 'axios'

export default {
  data() {
    return {
      fetchData: '1'
    }
  },
  methods: {
    fetchMethod() {
      axios.post('http://localhost:8080/pattern-study/toString')
        .then(response => {
          this.fetchData = response.data;
        })
        .catch(error => {
          console.error('There was an error!', error);
        });
    }
  },
  name: 'App',
}
</script>

<style>
</style>
